package com.alison.module.authors.mapper;

import com.alison.module.authors.domain.param.AuthorParam;
import com.alison.module.authors.entity.Author;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;
import java.util.Set;


@Mapper
public interface AuthorMapper {


    @Select("select * from author")
    List<Author> selectAll();

    List<Author> selectAll(AuthorParam authorParam);

    List<Author> selectAllInIdsArr(String[] ids);// @param("array)默认

    List<Author> selectAllInIdsSet(@Param("set") Set ids);

    List<Author> selectAllInIdsMap(Map idsMap);

    List<Author> selectAllInIdsList(List ids);//@param("list") 默认

    int deleteByPrimaryKey(Integer id);

    int insert(Author record);

    int insertSelective(Author record);

//    @Select("select * from author")
//    List<Author> selectAll();

    Author selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Author record);

    int updateByPrimaryKey(Author record);
}